<template>
  <div class="btn-box">
    <el-button @click="$emit('cancel')">取消</el-button>
    <el-button v-if="showSave" type="primary" @click="$emit('confirm')"
      >保存</el-button
    >
  </div>
</template>

<script>
export default {
  props: {
    showSave: {
      type: Boolean,
      default: true,
    },
  },
};
</script>

<style lang="scss" scoped>
.btn-box {
  position: fixed;
  z-index: 999;
  bottom: 20px;
  left: 60px;
  width: 100%;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #dcdfe6;
  background-color: #fff;
}
</style>